class HTTP{
 request(params){
   if(!params.method){
     params.method="POST"
   }
   wx.request({
     url: params.url,
     method: params.method,
     data: params.data,
     header: {
       'content-type': 'application/x-www-form-urlencoded'
     },
     success: (res) =>{
       params.success(res.data)
     },
     fail: (err) => {

     }
   })
 }
}
export {HTTP}